package repository

import (
	"context"
	"webook/search/domain"
	"webook/search/repository/dao"
)

type interactiveRepository struct {
	likeDao    dao.InteractiveLikeDAO
	collectDao dao.InteractiveCollectDAO
}

func (i *interactiveRepository) InputCollectInfo(ctx context.Context, info domain.UserCollectionInfo) error {
	return i.collectDao.InputCollectInfo(ctx, dao.BizCollectInfo{
		Id:    info.Id,
		Biz:   info.Biz,
		BizId: info.BizId,
		Uid:   info.Uid,
	})
}

func (i *interactiveRepository) InputLikeInfo(ctx context.Context, info domain.UserLikeInfo) error {
	return i.likeDao.InputLikeInfo(ctx, dao.BizLikeInfo{
		Id:    info.Id,
		Biz:   info.Biz,
		BizId: info.BizId,
		Uid:   info.Uid,
	})
}
